package com.xs.ahoi.hcxs.model.enums;


import java.util.Arrays;

/**
 * TTS发音人枚举
 *
 * @author fuhuichao
 * @date 2020-01-17 10:55
 */
public enum SpeakerEnum {

    S_100510000(100510000, "智逍遥，阅读男声"),
    S_101001(101001, "智瑜，情感女声"),
    S_101002(101002, "智聆，通用女声"),
    S_101005(101005, "智莉，通用女声"),
    S_101026(101026, "智希，通用女声"),
    S_101027(101027, "智梅，通用女声"),
    S_101034(101034, "智莲，通用女声"),
    S_101003(101003, "智美，客服女声"),
    S_101007(101007, "智娜，客服女声"),
    S_101033(101033, "智蓓，客服女声"),
    S_101011(101011, "智燕，新闻女声"),
    S_101022(101022, "智虹，新闻女声"),
    S_101019(101019, "智彤，粤语女声"),
    S_101023(101023, "智萱，聊天女声"),
    S_101040(101040, "智川，四川女声"),
    S_101024(101024, "智皓，聊天男声"),
    S_101029(101029, "智凯，通用男声"),
    S_101030(101030, "智柯，通用男声"),
    S_101031(101031, "智奎，通用男声"),
    S_101018(101018, "智靖，情感男声"),
    S_101014(101014, "智宁，新闻男声"),
    S_101015(101015, "智萌，男童声"),
    ;


    private int code;
    private String text;

    SpeakerEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static SpeakerEnum getByText(String text) {
        return Arrays.stream(SpeakerEnum.values()).filter(o -> o.getText().equals(text)).findFirst().orElse(S_100510000);
    }
}
